﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace UniRx
{
	// Token: 0x02000418 RID: 1048
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct DictionaryReplaceEvent<TKey, TValue> : IEquatable<DictionaryReplaceEvent<TKey, TValue>>
	{
		// Token: 0x06001592 RID: 5522 RVA: 0x0005F7F5 File Offset: 0x0005DBF5
		public DictionaryReplaceEvent(TKey key, TValue oldValue, TValue newValue)
		{
			this = default(DictionaryReplaceEvent<TKey, TValue>);
			this.Key = key;
			this.OldValue = oldValue;
			this.NewValue = newValue;
		}

		// Token: 0x170001A2 RID: 418
		// (get) Token: 0x06001593 RID: 5523 RVA: 0x0005F813 File Offset: 0x0005DC13
		// (set) Token: 0x06001594 RID: 5524 RVA: 0x0005F81B File Offset: 0x0005DC1B
		public TKey Key { get; private set; }

		// Token: 0x170001A3 RID: 419
		// (get) Token: 0x06001595 RID: 5525 RVA: 0x0005F824 File Offset: 0x0005DC24
		// (set) Token: 0x06001596 RID: 5526 RVA: 0x0005F82C File Offset: 0x0005DC2C
		public TValue OldValue { get; private set; }

		// Token: 0x170001A4 RID: 420
		// (get) Token: 0x06001597 RID: 5527 RVA: 0x0005F835 File Offset: 0x0005DC35
		// (set) Token: 0x06001598 RID: 5528 RVA: 0x0005F83D File Offset: 0x0005DC3D
		public TValue NewValue { get; private set; }

		// Token: 0x06001599 RID: 5529 RVA: 0x0005F846 File Offset: 0x0005DC46
		public override string ToString()
		{
			return string.Format("Key:{0} OldValue:{1} NewValue:{2}", this.Key, this.OldValue, this.NewValue);
		}

		// Token: 0x0600159A RID: 5530 RVA: 0x0005F873 File Offset: 0x0005DC73
		public override int GetHashCode()
		{
			return EqualityComparer<TKey>.Default.GetHashCode(this.Key) ^ EqualityComparer<TValue>.Default.GetHashCode(this.OldValue) << 2 ^ EqualityComparer<TValue>.Default.GetHashCode(this.NewValue) >> 2;
		}

		// Token: 0x0600159B RID: 5531 RVA: 0x0005F8AC File Offset: 0x0005DCAC
		public bool Equals(DictionaryReplaceEvent<TKey, TValue> other)
		{
			return EqualityComparer<TKey>.Default.Equals(this.Key, other.Key) && EqualityComparer<TValue>.Default.Equals(this.OldValue, other.OldValue) && EqualityComparer<TValue>.Default.Equals(this.NewValue, other.NewValue);
		}
	}
}
